Impact of pituitary dysfunction on cognitive and global outcome after traumatic brain injury and aneurysmal subarachnoid haemorrhage